package cn.blbsz.shop.security;

import cn.blbsz.shop.domain.p.UserEntity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class UserDetail extends User {

	private static final long serialVersionUID = 7426484260463168353L;
	UserEntity userEntity;

	public UserDetail(UserEntity userEntity, Collection<? extends GrantedAuthority> authorities) {
		super(userEntity.getTel(), userEntity.getPassword(), authorities);
		this.userEntity=userEntity;
	}

	public UserEntity getUserEntity() {
		return userEntity;
	}
}
